package model

import "time"

type ChatMessage struct {
	Id          int       `json:"id" db:"id"`
	SenderId    int       `json:"sender_id" db:"sender_id"`
	SenderName  string    `json:"sender_name" db:"sender_name" binding:"max=100"`
	MessageType string    `json:"message_type" db:"message_type" binding:"max=20"`
	Content     string    `json:"content" db:"content" binding:"max=500"`
	FilePath    string    `json:"file_path" db:"file_path" binding:"max=500"`
	FileName    string    `json:"file_name" db:"file_name" binding:"max=255"`
	FileSize    int       `json:"file_size" db:"file_size"`
	FileMime    string    `json:"file_mime" db:"file_mime" binding:"max=100"`
	CreatedAt   time.Time `json:"created_at" db:"created_at"`
}

func (c *ChatMessage) TableName() string {
	return "chat_messages"
}
